<template>
	<view>
		<view class="smart-container">1.容器</view>
		<view class="smart-panel-title"  @click="goDetailPage('view')"><text>view视图</text></view>
		<view class="smart-panel-h" @click="goDetailPage('scroll-view')" ><text>scroll-view滚动视图</text></view>
		<view class="smart-panel-swiper" @click="goDetailPage('swiper')"><text>swiper可滑动视图</text></view>
		<view class="smart-container">2.基础内容</view>
		<view class="smart-panel-h" @click="goDetailPage('text')">text文本编辑</view>
		<view class="smart-panel-h" @click="goDetailPage('icon')">icon图标</view>
		<view class="smart-container">3.表单组件</view>
		<view class="smart-panel-h" @click="goDetailPage('button')">button按钮</view>
		<view class="smart-panel-h" @click="goDetailPage('checkbox')">checkbox多选框</view>
		<view class="smart-panel-h" @click="goDetailPage('input')">input输入框</view>
		<view class="smart-panel-h" @click="goDetailPage('textarea')">textarea多行文本输入框</view>
		<view class="smart-panel-h" @click="goDetailPage('form')">form表单</view>
		<view class="smart-container">4.导航组件</view>
		<view class="smart-panel-h" @click="goDetailPage('navigator')">navigator</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			goDetailPage(e) {
				if (typeof e === 'string') {
					uni.navigateTo({
						url: '/pages/demos/' + e + '/' + e
					});
				} else {
					uni.navigateTo({
						url: e.url
					});
				}
			}

		}
	}
</script>

<style>
	.smart-panel-swiper{
		background-color: aqua;
		padding: 5px;
		align-items: center;
		margin-bottom: 2rpx;
	}
</style>
